package org.scohen.juploadr.uploadapi.zooomr.photosets;

import java.util.List;
import java.util.SortedMap;
import java.util.TreeMap;

import org.scohen.juploadr.app.PhotoSet;
import org.scohen.juploadr.uploadapi.CommunicationException;
import org.scohen.juploadr.uploadapi.ProtocolException;
import org.scohen.juploadr.uploadapi.flickrrest.RestFlickrApi;
import org.scohen.juploadr.uploadapi.zooomr.DefaultZooomrHandler;
import org.scohen.juploadr.uploadapi.zooomr.ZooomrMethod;

public class GetPhotosetList extends ZooomrMethod {
    private GetPhotosetListHandler handler = new GetPhotosetListHandler(this);

    public DefaultZooomrHandler getResponseHandler() {
        return handler;
    }

    public boolean execute() throws ProtocolException, CommunicationException {
        boolean success = super.execute();
        if (success) {
            
        }
        return success;
    }

    public SortedMap<String, String> getParams() {
        SortedMap<String, String> params = new TreeMap<String, String>();
        params.put("method", "zooomr.photosets.getList");
        params.put("api_key", RestFlickrApi.FLICKR_API_KEY);
        return params;
    }

    public List<PhotoSet> getPhotoSets() {
        return handler.getPhotoSets();
    }

    public boolean isAuthorized() {
        return true;
    }
}
